﻿using System;

namespace System.Linq.Dynamic
{
    [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)]
    public sealed class ReliabilityContractAttribute : Attribute
    {
        // Fields
        private Cer _cer;
        private Consistency _consistency;

        // Methods
        public ReliabilityContractAttribute(Consistency consistencyGuarantee, Cer cer)
        {
            this._consistency = consistencyGuarantee;
            this._cer = cer;
        }

        // Properties
        public Cer Cer
        {
            get
            {
                return this._cer;
            }
        }

        public Consistency ConsistencyGuarantee
        {
            get
            {
                return this._consistency;
            }
        }
    }
    public enum Consistency
    {
        MayCorruptProcess,
        MayCorruptAppDomain,
        MayCorruptInstance,
        WillNotCorruptState
    }


    public enum Cer
    {
        None,
        MayFail,
        Success
    }
}
